package no.met.metdata.proxy;

import java.util.Vector;
import java.net.URL;
import java.util.Properties;
import java.lang.reflect.Method;
import java.util.HashMap;
import org.apache.soap.Header;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import org.apache.soap.Constants;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.encoding.soapenc.BeanSerializer;
import org.apache.soap.transport.http.SOAPHTTPConnection;
import org.apache.soap.util.xml.QName;

/**
 * Web service proxy: MetService
 *     generated by Oracle WSDL toolkit (Version: 1.0).
 */
public class MetServiceProxy {

    public MetServiceProxy() {
        m_httpConnection = new SOAPHTTPConnection();
        _setMaintainSession(true);
        m_soapMappingRegistry = new SOAPMappingRegistry();

        BeanSerializer beanSer = new BeanSerializer();

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_ElementProperties"), no.met.metdata.proxy.no_met_metdata_ElementProperties.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_StationProperties"), no.met.metdata.proxy.no_met_metdata_StationProperties.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_Location"), no.met.metdata.proxy.no_met_metdata_Location.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_Metdata"), no.met.metdata.proxy.no_met_metdata_Metdata.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_TimeStamp"), no.met.metdata.proxy.no_met_metdata_TimeStamp.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_TimeSerieTypes"), no.met.metdata.proxy.no_met_metdata_TimeSerieTypes.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_FlagProperties"), no.met.metdata.proxy.no_met_metdata_FlagProperties.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_WeatherElement"), no.met.metdata.proxy.no_met_metdata_WeatherElement.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_PrecipitationTypes"), no.met.metdata.proxy.no_met_metdata_PrecipitationTypes.class, beanSer, beanSer);

        m_soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://no.met.metdata/IMetService.xsd" ,"no_met_metdata_CountyTypes"), no.met.metdata.proxy.no_met_metdata_CountyTypes.class, beanSer, beanSer);

        
        Object untypedParams[] = {
            new String("getStationsFromTimeserieTypeElemCodes"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_StationProperties"),
            new String("getDateFormat"), new String("return"), new QName("http://www.w3.org/2001/XMLSchema","string"),
            new String("getElementsFromTimeserieTypeStation"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_ElementProperties"),
            new String("getMetData"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","no_met_metdata_Metdata"),
            new String("getMetData"), new String("created"), new QName("http://www.w3.org/2001/XMLSchema","dateTime"),
            new String("getMetData"), new String("type"), new QName("http://www.w3.org/2001/XMLSchema","string"),
            new String("getMetData"), new String("timeStamp"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_TimeStamp"),
            new String("getFlagProperties"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_FlagProperties"),
            new String("getElementsFromTimeserieType"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_ElementProperties"),
            new String("getValidLanguages"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfString"),
            new String("getStationsFromTimeserieTypeStationsElemCode"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_StationProperties"),
            new String("getCountyTypes"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_CountyTypes"),
            new String("getStationsProperties"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_StationProperties"),
            new String("getTimeserieTypesProperties"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_TimeSerieTypes"),
            new String("getPrecipitationTypes"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_PrecipitationTypes"),
            new String("getStationsFromTimeserieType"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_StationProperties"),
            new String("getElementsProperties"), new String("return"), new QName("http://no.met.metdata/IMetService.xsd","ArrayOfno_met_metdata_ElementProperties")
        };

        String operationName;
        String paramName;
        QName returnType;
        SOAPMappingRegistry registry;
        org.apache.soap.util.xml.Deserializer deserializer;
        int x;
        for (x = 0; x < untypedParams.length; x += 3) {
            operationName = (String) untypedParams[x];
            paramName = (String) untypedParams[x+1];
            returnType = (QName) untypedParams[x+2];

            registry = (SOAPMappingRegistry) m_soapMappingRegistries.get(operationName);
            if (registry == null) {
                if (m_soapMappingRegistry != null) {
                    registry = new SOAPMappingRegistry(m_soapMappingRegistry);
                } else {
                    registry = new SOAPMappingRegistry();
                }
                m_soapMappingRegistries.put(operationName,registry);
            }

            try {
                deserializer = registry.queryDeserializer(returnType,Constants.NS_URI_SOAP_ENC);
                registry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",paramName), null, null, deserializer);
            } catch(IllegalArgumentException e) {
            }
        }

    }

    public org.w3c.dom.Element getRegionHistoryTrend(java.lang.String region_type, java.lang.Integer region_no, java.lang.String element, java.lang.Integer fromYear, java.lang.Integer toYear, java.lang.Integer month, java.lang.String language) throws Exception {
        String soapActionURI = "";
        String paramEncodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        String callEncodingStyleURI = "http://xml.apache.org/xml-soap/literalxml";
        Vector params = new Vector();
        params.add(new Parameter("region_type", java.lang.String.class, region_type, paramEncodingStyleURI));
        params.add(new Parameter("region_no", java.lang.Integer.class, region_no, paramEncodingStyleURI));
        params.add(new Parameter("element", java.lang.String.class, element, paramEncodingStyleURI));
        params.add(new Parameter("fromYear", java.lang.Integer.class, fromYear, paramEncodingStyleURI));
        params.add(new Parameter("toYear", java.lang.Integer.class, toYear, paramEncodingStyleURI));
        params.add(new Parameter("month", java.lang.Integer.class, month, paramEncodingStyleURI));
        params.add(new Parameter("language", java.lang.String.class, language, paramEncodingStyleURI));
        Response response = makeSOAPCallRPC("getRegionHistoryTrend", params, callEncodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (org.w3c.dom.Element)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_StationProperties[] getStationsFromTimeserieTypeElemCodes(java.lang.String timeserietypeID, java.lang.String elem_codes, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, null));
        params.add(new Parameter("elem_codes", java.lang.String.class, elem_codes, null));
        params.add(new Parameter("username", java.lang.String.class, username, null));
        Response response = makeSOAPCallRPC("getStationsFromTimeserieTypeElemCodes", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_StationProperties[])returnValue.getValue();

    }

    public java.lang.String getDateFormat() throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        Response response = makeSOAPCallRPC("getDateFormat", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (java.lang.String)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_ElementProperties[] getElementsFromTimeserieTypeStation(java.lang.String timeserietypeID, java.lang.Integer stnr) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, null));
        params.add(new Parameter("stnr", java.lang.Integer.class, stnr, null));
        Response response = makeSOAPCallRPC("getElementsFromTimeserieTypeStation", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_ElementProperties[])returnValue.getValue();

    }

    public org.w3c.dom.Element getStationProperties(java.lang.String station) throws Exception {
        String soapActionURI = "";
        String paramEncodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        String callEncodingStyleURI = "http://xml.apache.org/xml-soap/literalxml";
        Vector params = new Vector();
        params.add(new Parameter("station", java.lang.String.class, station, paramEncodingStyleURI));
        Response response = makeSOAPCallRPC("getStationProperties", params, callEncodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (org.w3c.dom.Element)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_Metdata getMetData(java.lang.String timeserietypeID, java.lang.String format, java.lang.String from, java.lang.String to, java.lang.String stations, java.lang.String elements, java.lang.String hours, java.lang.String months, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, null));
        params.add(new Parameter("format", java.lang.String.class, format, null));
        params.add(new Parameter("from", java.lang.String.class, from, null));
        params.add(new Parameter("to", java.lang.String.class, to, null));
        params.add(new Parameter("stations", java.lang.String.class, stations, null));
        params.add(new Parameter("elements", java.lang.String.class, elements, null));
        params.add(new Parameter("hours", java.lang.String.class, hours, null));
        params.add(new Parameter("months", java.lang.String.class, months, null));
        params.add(new Parameter("username", java.lang.String.class, username, null));
        Response response = makeSOAPCallRPC("getMetData", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_Metdata)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_FlagProperties[] getFlagProperties(java.lang.String language, java.lang.String flagsId) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, null));
        params.add(new Parameter("flagsId", java.lang.String.class, flagsId, null));
        Response response = makeSOAPCallRPC("getFlagProperties", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_FlagProperties[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_ElementProperties[] getElementsFromTimeserieType(java.lang.String timeserietypeID) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, null));
        Response response = makeSOAPCallRPC("getElementsFromTimeserieType", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_ElementProperties[])returnValue.getValue();

    }

    public java.lang.String[] getValidLanguages() throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        Response response = makeSOAPCallRPC("getValidLanguages", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (java.lang.String[])returnValue.getValue();

    }

    public org.w3c.dom.Element getStationsFromTimeserietypeStationsElemcode(java.lang.String language, java.lang.String timeserietypeID, java.lang.String stations, java.lang.String elem_code) throws Exception {
        String soapActionURI = "";
        String paramEncodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        String callEncodingStyleURI = "http://xml.apache.org/xml-soap/literalxml";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, paramEncodingStyleURI));
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, paramEncodingStyleURI));
        params.add(new Parameter("stations", java.lang.String.class, stations, paramEncodingStyleURI));
        params.add(new Parameter("elem_code", java.lang.String.class, elem_code, paramEncodingStyleURI));
        Response response = makeSOAPCallRPC("getStationsFromTimeserietypeStationsElemcode", params, callEncodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (org.w3c.dom.Element)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_StationProperties[] getStationsFromTimeserieTypeStationsElemCode(java.lang.String timeserietype, java.lang.String stations, java.lang.String elem_code, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietype", java.lang.String.class, timeserietype, null));
        params.add(new Parameter("stations", java.lang.String.class, stations, null));
        params.add(new Parameter("elem_code", java.lang.String.class, elem_code, null));
        params.add(new Parameter("username", java.lang.String.class, username, null));
        Response response = makeSOAPCallRPC("getStationsFromTimeserieTypeStationsElemCode", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_StationProperties[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_CountyTypes[] getCountyTypes(java.lang.String language, java.lang.String countiesId) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, null));
        params.add(new Parameter("countiesId", java.lang.String.class, countiesId, null));
        Response response = makeSOAPCallRPC("getCountyTypes", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_CountyTypes[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_StationProperties[] getStationsProperties(java.lang.String stations, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("stations", java.lang.String.class, stations, null));
        params.add(new Parameter("username", java.lang.String.class, username, null));
        Response response = makeSOAPCallRPC("getStationsProperties", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_StationProperties[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_TimeSerieTypes[] getTimeserieTypesProperties(java.lang.String language, java.lang.String timeserieTypes) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, null));
        params.add(new Parameter("timeserieTypes", java.lang.String.class, timeserieTypes, null));
        Response response = makeSOAPCallRPC("getTimeserieTypesProperties", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_TimeSerieTypes[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_PrecipitationTypes[] getPrecipitationTypes(java.lang.String language, java.lang.String precipitationTypesId) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, null));
        params.add(new Parameter("precipitationTypesId", java.lang.String.class, precipitationTypesId, null));
        Response response = makeSOAPCallRPC("getPrecipitationTypes", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_PrecipitationTypes[])returnValue.getValue();

    }

    public org.w3c.dom.Element getMetDataValues(java.lang.String timeserietypeID, java.lang.String format, java.lang.String from, java.lang.String to, java.lang.String stations, java.lang.String elements, java.lang.String hours, java.lang.String months, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String paramEncodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        String callEncodingStyleURI = "http://xml.apache.org/xml-soap/literalxml";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, paramEncodingStyleURI));
        params.add(new Parameter("format", java.lang.String.class, format, paramEncodingStyleURI));
        params.add(new Parameter("from", java.lang.String.class, from, paramEncodingStyleURI));
        params.add(new Parameter("to", java.lang.String.class, to, paramEncodingStyleURI));
        params.add(new Parameter("stations", java.lang.String.class, stations, paramEncodingStyleURI));
        params.add(new Parameter("elements", java.lang.String.class, elements, paramEncodingStyleURI));
        params.add(new Parameter("hours", java.lang.String.class, hours, paramEncodingStyleURI));
        params.add(new Parameter("months", java.lang.String.class, months, paramEncodingStyleURI));
        params.add(new Parameter("username", java.lang.String.class, username, paramEncodingStyleURI));
        Response response = makeSOAPCallRPC("getMetDataValues", params, callEncodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (org.w3c.dom.Element)returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_StationProperties[] getStationsFromTimeserieType(java.lang.String timeserietypeID, java.lang.String username) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("timeserietypeID", java.lang.String.class, timeserietypeID, null));
        params.add(new Parameter("username", java.lang.String.class, username, null));
        Response response = makeSOAPCallRPC("getStationsFromTimeserieType", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_StationProperties[])returnValue.getValue();

    }

    public no.met.metdata.proxy.no_met_metdata_ElementProperties[] getElementsProperties(java.lang.String language, java.lang.String elem_codes) throws Exception {
        String soapActionURI = "";
        String encodingStyleURI = "http://schemas.xmlsoap.org/soap/encoding/";
        Vector params = new Vector();
        params.add(new Parameter("language", java.lang.String.class, language, null));
        params.add(new Parameter("elem_codes", java.lang.String.class, elem_codes, null));
        Response response = makeSOAPCallRPC("getElementsProperties", params, encodingStyleURI, soapActionURI);
        Parameter returnValue = response.getReturnValue();
        return (no.met.metdata.proxy.no_met_metdata_ElementProperties[])returnValue.getValue();

    }

    private Response makeSOAPCallRPC(String methodName, Vector params, String encodingStyleURI, String soapActionURI) throws Exception {
        Call call  = new Call();
        call.setSOAPTransport(m_httpConnection);
        SOAPMappingRegistry registry;
        if ((registry = (SOAPMappingRegistry)m_soapMappingRegistries.get(methodName)) != null)
            call.setSOAPMappingRegistry(registry);
        else if (m_soapMappingRegistry != null)
            call.setSOAPMappingRegistry(m_soapMappingRegistry);
        call.setTargetObjectURI(m_serviceID);
        call.setMethodName(methodName);
        call.setEncodingStyleURI(encodingStyleURI);
        call.setParams(params);
        if (m_headers != null)
            call.setHeader(m_headers);

        Response response = call.invoke(new URL(m_soapURL), soapActionURI);
        if (response.generatedFault()) {
            Fault fault = response.getFault();
            throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
        }
        return response;

    }

    public String _getSoapURL() {
        return m_soapURL;

    }

    public void _setSoapURL(String soapURL) {
        m_soapURL = soapURL;

    }

    public String _getServiceID() {
        return m_serviceID;

    }

    public void _setServiceID(String serviceID) {
        m_serviceID = serviceID;

    }

    public SOAPMappingRegistry _getSOAPMappingRegistry() {
        return m_soapMappingRegistry;

    }

    public void _setSOAPMappingRegistry(SOAPMappingRegistry soapMappingRegistry) {
        m_soapMappingRegistry = soapMappingRegistry;

    }

    public boolean _getMaintainSession() {
        return m_httpConnection.getMaintainSession();

    }

    public void _setMaintainSession(boolean maintainSession) {
        m_httpConnection.setMaintainSession(maintainSession);

    }

    public void _setContext(Object ctx) throws Exception {
        try {
          Method m = SOAPHTTPConnection.class.getMethod("setContext", new Class[]{Object.class});
          m.invoke(m_httpConnection, new Object[]{ctx});
        } catch (Exception e) {
          throw new Exception("Method setContext not supported by this soap version: " + e.getMessage());
        }

    }

 //   public Properties _getTransportProperties() {
  //      m_httpConnection.
  //      return m_httpConnection.getProperties();

  //  }

  //  public void _setTransportProperties(Properties properties) {
 ///       m_httpConnection.setProperties(properties);
//
 //   }

    public String _getVersion() {
        return m_version;

    }

    public Header _getSOAPRequestHeaders() {
        return m_headers;

    }

    public void _setSOAPRequestHeaders(Header headers) {
        m_headers = headers;

    }


    private String m_serviceID = "MetService";
    private String m_soapURL = "http://eklima.met.no/met/MetService";
    private SOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_soapMappingRegistry = null;
    private String m_version = "1.0";
    private HashMap m_soapMappingRegistries = new HashMap();
    private Header m_headers = null;

}
